﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Text;
using OpenAuth.Repository.Domain;
using OpenAuth.Repository.Interface;

namespace OpenAuth.App
{
    public class CDRGH005App : ApiBaseApp<CDRGH005>
    {
        public CDRGH005App(IApiRepository<CDRGH005> repository) : base(repository)
        {
        }
        /// <summary>
        /// 当班医生查询(当班医生信息查询)
        /// </summary>
        /// <param name="ksdm">科室代码</param>
        /// <returns></returns>
        public IEnumerable<CDRGH005> QueryCDRGH005ByKsdm(string ksdm)
        {
            List<SqlParameter> param = new List<SqlParameter>();
            param.Add(new SqlParameter("@Ksdm", ksdm));
            param.Add(new SqlParameter("@Czyh", "hf001"));
            var result = Query<CDRGH005>("exec usp_web_webtrans_CDRGH005 @ksdm=@Ksdm,@czyh=@Czyh", param);
            return result;
        }
    }
}
